package com.ibm.cloud.banking.media.entity;

import java.sql.Timestamp;
import java.util.Objects;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * replace desc in here
 *
 * @author HanDong
 * @date 2022/7/18
 */
@Entity
@Table(name = "media_card_account_rel")
public class MediaCardAccountRelEntity {
    @Basic
    @Column(name = "id")
    @Id
    private long id;
    @Basic
    @Column(name = "card_no")
    private String cardNo;
    @Basic
    @Column(name = "type")
    private String type;
    @Basic
    @Column(name = "account_no")
    private String accountNo;
    @Basic
    @Column(name = "create_dt")
    private Timestamp createDt;
    @Basic
    @Column(name = "update_dt")
    private Timestamp updateDt;
    @Basic
    @Column(name = "sharding_id")
    private Integer shardingId;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public Timestamp getCreateDt() {
        return createDt;
    }

    public void setCreateDt(Timestamp createDt) {
        this.createDt = createDt;
    }

    public Timestamp getUpdateDt() {
        return updateDt;
    }

    public void setUpdateDt(Timestamp updateDt) {
        this.updateDt = updateDt;
    }

    public Integer getShardingId() {
        return shardingId;
    }

    public void setShardingId(Integer shardingId) {
        this.shardingId = shardingId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MediaCardAccountRelEntity that = (MediaCardAccountRelEntity) o;
        return id == that.id && Objects.equals(cardNo, that.cardNo) && Objects.equals(type, that.type) && Objects.equals(accountNo, that.accountNo) && Objects.equals(createDt, that.createDt) && Objects.equals(updateDt, that.updateDt) && Objects.equals(shardingId, that.shardingId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, cardNo, type, accountNo, createDt, updateDt, shardingId);
    }
}
